package springlog.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/log")
@RestController
public class LogController {
    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/print")
    public String print(){
        System.out.println("sout打印日志");
        logger.info("logger打印日志");
        logger.trace("trace");
        logger.debug("debug");
        logger.warn("warn");
        logger.debug("debug");
        logger.error("error");
        return "打印日志";
    }
}
